-- GENERATED SPELL FOR [Dark Iron Geologist] --


function spell0_5839(pUnit, Event) --@Bomb,n/a--
pUnit:FullCastSpellOnTarget(8858,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_5839', 2000, 1)
end

function spell1_5839(pUnit, Event) --@Fireball,n/a--
pUnit:FullCastSpellOnTarget(20823,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_5839', 3000, 1)
end

function Sorts_5839(pUnit, Event)
local choix_sorts_5839 = math.random(0, 1)
if choix_sorts_5839 == 0 then
pUnit:RegisterEvent('spell0_5839', 1, 1)
end
if choix_sorts_5839 == 1 then
pUnit:RegisterEvent('spell1_5839', 1, 1)
end
end

function mob5839_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_5839', math.random(1500, 3000), 1)
end

function mob5839_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob5839_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob5839_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(5839, 1, 'mob5839_Action')
RegisterUnitEvent(5839, 2, 'mob5839_Leave')
RegisterUnitEvent(5839, 3, 'mob5839_Kill')
RegisterUnitEvent(5839, 4, 'mob5839_Die')
